(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/elm/index" ], {
    3139: function(e, o, n) {
        (function(r) {
            Object.defineProperty(o, "__esModule", {
                value: !0
            }), o.default = void 0;
            var e, i = (e = n("a34a")) && e.__esModule ? e : {
                default: e
            };
            function s(e, t, a, o, n, i, r) {
                try {
                    var c = e[i](r), s = c.value;
                } catch (e) {
                    return a(e), 0;
                }
                c.done ? t(s) : Promise.resolve(s).then(o, n);
            }
            function a(c) {
                return function() {
                    var e = this, r = arguments;
                    return new Promise(function(t, a) {
                        var o = c.apply(e, r);
                        function n(e) {
                            s(o, t, a, n, i, "next", e);
                        }
                        function i(e) {
                            s(o, t, a, n, i, "throw", e);
                        }
                        n(void 0);
                    });
                };
            }
            var c = getApp(), t = {
                data: function() {
                    return {
                        module_name: c.globalData.module_name,
                        showAlert_login: !1,
                        showAlert: !1,
                        userinfo: r.getStorageSync("userinfo"),
                        setting: r.getStorageSync("setting"),
                        wxCode: "",
                        demoHtmlwm: "",
                        demoHtmlsc: "",
                        systemtype: "",
                        p: 0,
                        loadposter: 0,
                        appid_type: 0,
                        qudao_tkl: "",
                        h5: "",
                        is_qudao_tkl: 0,
                        showAlert_taobaoauth: !1,
                        elm_url: [],
                        meituan_url: [],
                        show_poster: !1,
                        currentIndex: 0,
                        tabs: [ "外卖", "果蔬商超" ],
                        mainHeight: r.getStorageSync("windowviewHeight"),
                        contact_title: "",
                        contact_title_text: "",
                        contact_title_desc: "",
                        contact_id: "",
                        contact_type: "",
                        contact_thumb: "",
                        pageLoading: !0,
                        pagebgcolor: r.getStorageSync("setting").waimaitt_meituanwm_bgcolor,
                        qrcode: "",
                        elmwmqrcode: "",
                        elmscqrcode: "",
                        elmwmposter: "",
                        elmscposter: "",
                        elmwm_act_id: 0,
                        mtpic: 0,
                        width: 750,
                        cheight: 1334,
                        widthIn: 300,
                        heightIn: 500,
                        bgColor: "#7ACBDC",
                        bgImg: "",
                        imgSrc: null,
                        rpx2px: 1,
                        context: null,
                        multiple: 1,
                        showToast_login: !1,
                        footerCurrent: 0,
                        pageKey: "",
                        height: "",
                        tabBar: [],
                        sharetitle: "",
                        sharepic: "",
                        speakerMsgs: [],
                        list: [],
                        appid: "",
                        path: "",
                        search_id: "",
                        uid: 0,
                        is_tabbar: 1
                    };
                },
                components: {
                    gracePage: (n("e5c8"), n("5f91"), function() {
                        n.e("graceUI/components/gracePage").then(function() {
                            return resolve(n("1021"));
                        }.bind(null, n)).catch(n.oe);
                    }),
                    graceHeader: function() {
                        n.e("graceUI/components/graceHeader").then(function() {
                            return resolve(n("266b"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    graceNavBar: function() {
                        n.e("graceUI/components/graceNavBar").then(function() {
                            return resolve(n("a631"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    graceShade: function() {
                        n.e("graceUI/components/graceShade").then(function() {
                            return resolve(n("31ed"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    graceDialog: function() {
                        n.e("graceUI/components/graceDialog").then(function() {
                            return resolve(n("f85d"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    graceLoading: function() {
                        n.e("graceUI/components/graceLoading").then(function() {
                            return resolve(n("1d04"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    graceSpeaker: function() {
                        n.e("graceUI/components/graceSpeaker2").then(function() {
                            return resolve(n("a90e"));
                        }.bind(null, n)).catch(n.oe);
                    }
                },
                props: {},
                onPullDownRefresh: function() {},
                onShareAppMessage: function() {
                    var e = "pages/elm/index?uid=" + r.getStorageSync("userinfo").user_id;
                    return {
                        title: this.sharetitle,
                        imageUrl: this.sharepic,
                        path: e
                    };
                },
                onShow: function() {
                    var n = this;
                    return a(i.default.mark(function e() {
                        var t, a, o;
                        return i.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, n.$onLaunched;

                              case 2:
                                for (t = 0, (o = n).tabBar = r.getStorageSync("tabbar"), a = 0; a < n.tabBar.list.length; a++) -1 != n.tabBar.list[a].url.indexOf("elm/index") && (n.pageKey = a, 
                                t = 1);
                                n.is_tabbar = 1 == t ? 1 : 0, 1 == o.is_tabbar ? o.mainHeight = r.getStorageSync("windowviewHeight") - r.upx2px(o.setting.tabbar_tabBarHight) : o.mainHeight = r.getStorageSync("windowviewHeight"), 
                                console.log(n.mainHeight), n.currentIndex = 0, n.h5 = r.getStorageSync("elmwm_h5"), 
                                o = n, o = c.globalData.util.url("entry/wxapp/api", {
                                    m: c.globalData.module_name,
                                    o: "chkpid"
                                }), r.request({
                                    url: o,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid")
                                    },
                                    success: function(e) {
                                        e = c.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), e = JSON.parse(e);
                                        console.log(e), r.setStorageSync("pid_use_time", e), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && (r.setStorageSync("elmwm_url", ""), 
                                        r.setStorageSync("elmsc_url", ""), r.setStorageSync("elmwmposter", ""), r.setStorageSync("elmscposter", ""), 
                                        r.setStorageSync("pid_time", r.getStorageSync("pid_use_time")));
                                    }
                                }), o = c.globalData.util.url("entry/wxapp/subscribemessage", {
                                    m: c.globalData.module_name
                                }), r.request({
                                    url: o,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid"),
                                        type: 2
                                    },
                                    success: function(e) {
                                        r.setStorageSync("warn_daynum", e.data.warm_daynum);
                                    }
                                }), r.hideLoading();

                              case 19:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onReady: function() {
                    var t = this;
                    return a(i.default.mark(function e() {
                        return i.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, t.$onLaunched;

                              case 2:
                                setTimeout(function() {
                                    t.pageLoading = !1;
                                }, 1500);

                              case 3:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onLoad: function(e) {
                    var n = this;
                    return a(i.default.mark(function e() {
                        var t, a, o;
                        return i.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, n.$onLaunched;

                              case 2:
                                (t = n).setting = r.getStorageSync("setting"), t.tabBar = r.getStorageSync("tabbar"), 
                                t.userinfo = r.getStorageSync("userinfo"), t.demoHtmlwm = r.getStorageSync("setting").waimaitt_elmwm_notice, 
                                t.demoHtmlsc = r.getStorageSync("setting").waimaitt_elmsc_notice, r.hideLoading(), 
                                n.module_name = c.globalData.module_name, (t = n).elmwmqrcode = r.getStorageSync("elmwmqrcode"), 
                                n.elmscqrcode = r.getStorageSync("elmscqrcode"), n.elmwmposter = r.getStorageSync("elmwmposter"), 
                                n.elmscposter = r.getStorageSync("elmscposter"), n.pagebgcolor = r.getStorageSync("setting").waimaitt_elmwm_bgcolor, 
                                n.bgImg = r.getStorageSync("setting").waimaitt_elmwm_poster ? r.getStorageSync("setting").waimaitt_elmwm_poster : r.getStorageSync("setting").static_domain + "addons/" + n.module_name + "/static/images/poster/elmwm.png", 
                                a = c.globalData.util.url("entry/wxapp/api", {
                                    m: c.globalData.module_name,
                                    o: "chkpid"
                                }), r.request({
                                    url: a,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid")
                                    },
                                    success: function(e) {
                                        e = c.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), e = JSON.parse(e);
                                        console.log(e), r.setStorageSync("pid_use_time", e), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && (r.setStorageSync("elmwm_url", ""), 
                                        r.setStorageSync("elmsc_url", ""), r.setStorageSync("elmwmposter", ""), r.setStorageSync("elmscposter", ""), 
                                        r.setStorageSync("pid_time", r.getStorageSync("pid_use_time")));
                                    }
                                }), o = new Date(new Date().setHours(0, 0, 0, 0)) / 1e3, console.log(o), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && (r.setStorageSync("elmwm_url", ""), 
                                r.setStorageSync("elmsc_url", ""), r.setStorageSync("elmwmposter", ""), r.setStorageSync("elmscposter", "")), 
                                a = c.globalData.util.url("entry/wxapp/speakermsgs", {
                                    m: c.globalData.module_name
                                }), r.request({
                                    url: a,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid"),
                                        type: 2
                                    },
                                    success: function(e) {
                                        t.speakerMsgs = e.data.speakerMsgs;
                                    }
                                }), a = c.globalData.util.url("entry/wxapp/adlist", {
                                    m: c.globalData.module_name
                                }), r.request({
                                    url: a,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid"),
                                        type: 111,
                                        system_type: r.getStorageSync("systemtype")
                                    },
                                    success: function(e) {
                                        t.list = e.data.adlist, t.load_elmwmqrcode2();
                                    }
                                });

                              case 28:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                methods: {
                    change: function(e) {
                        var t = this, a = this.tabBar.list[e];
                        if (this.pageKey = e, r.setStorageSync("pageKey", e), 1 == a.adtype) {
                            if (1 == a.appid_type && r.getStorageSync("mtwm_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtwm_url")
                            });
                            if (1 == a.appid_type && !r.getStorageSync("mtwm_url")) return t.appid_type = 1, 
                            void t.meituan_urlFun();
                            if (2 == a.appid_type && r.getStorageSync("mtsc_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtsc_url")
                            });
                            if (2 == a.appid_type && !r.getStorageSync("mtsc_url")) return t.appid_type = 2, 
                            void t.meituan_urlFun();
                            if (3 == a.appid_type && r.getStorageSync("elmwm_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmwm_url")
                            }), t.updatepid(), void console.log(r.getStorageSync("elmwm_url"));
                            if (3 == a.appid_type && !r.getStorageSync("elmwm_url")) return t.appid_type = 3, 
                            void t.gettaobaoauth();
                            if (4 == a.appid_type && r.getStorageSync("elmsc_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmsc_url")
                            }), t.updatepid(), void console.log(r.getStorageSync("elmsc_url"));
                            if (4 == a.appid_type && !r.getStorageSync("elmsc_url")) return console.log("ccc"), 
                            t.appid_type = 4, void t.gettaobaoauth();
                            if (0 == a.appid_type) return void r.navigateToMiniProgram({
                                appId: a.appid,
                                path: a.path
                            });
                        }
                        if (5 != a.adtype) if (4 != a.adtype) 2 != a.adtype && 3 != a.adtype || (t = c.globalData.util.url("entry/wxapp/api", {
                            m: c.globalData.module_name,
                            o: "ad_kefubind"
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                adtype: "ad",
                                adid: a.adid,
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {}
                        }), this.contact_title_desc = "", this.contact_type = "ad", this.contact_id = a.adid, 
                        this.contact_title = a.title, this.contact_title_text = a.title_text, this.contact_title_desc = a.title_desc, 
                        this.contact_thumb = r.getStorageSync("setting").dianwo, this.showDialog3()); else {
                            r.setStorageSync("index_nav", a.url);
                            var o = getCurrentPages();
                            o.reverse();
                            for (var n = a.url.replace("../", ""), i = 0; i < o.length; i++) if (-1 != o[i].route.indexOf(n)) return void r.navigateBack({
                                delta: i
                            });
                            if (-1 == a.url.indexOf("../index/") && -1 == a.url.indexOf("../meituangroup/") && -1 == a.url.indexOf("../user/") && -1 == a.url.indexOf("../movie/") && -1 == a.url.indexOf("../shop/") && -1 == a.url.indexOf("../kefu/") && -1 == a.url.indexOf("../elm/") && -1 == a.url.indexOf("../meituan/") && -1 == a.url.indexOf("../mall/")) return -1 != a.url.indexOf("../../pages/index/") || -1 != a.url.indexOf("../../pages/user/") || -1 != a.url.indexOf("../../pages/kefu/") ? (n = a.url.replace("../../pages/", "../"), 
                            void r.navigateTo({
                                url: n
                            })) : -1 != a.url.indexOf("../../pages/meituan/") || -1 != a.url.indexOf("../../pages/elm/") || -1 != a.url.indexOf("../../pages/eat/") ? (n = a.url.replace("../../pages/", "../../pagesA/pages/"), 
                            void r.navigateTo({
                                url: n
                            })) : -1 != a.url.indexOf("../../pagesA/pages/movie/") || -1 != a.url.indexOf("../../pagesA/pages/shop/") || -1 != a.url.indexOf("../../pagesA/pages/mallA/mallindex") ? (n = a.url.replace("../../pagesA/pages/", "../"), 
                            void r.navigateTo({
                                url: n
                            })) : -1 == a.url.indexOf("../../pagesA/pages/movieA/") && -1 == a.url.indexOf("../../pagesA/pages/shopA/") && -1 == a.url.indexOf("../../pagesA/pages/meituan/") && -1 == a.url.indexOf("../../pagesA/pages/elm/") && -1 == a.url.indexOf("../../pagesA/pages/eat/") && -1 == a.url.indexOf("../../pagesA/pages/userA/") && (-1 != a.url.indexOf("../meituan/") || -1 != a.url.indexOf("../elm/") || -1 != a.url.indexOf("../eat/")) ? (n = a.url.replace("../", "../../pagesA/pages/"), 
                            void r.navigateTo({
                                url: n
                            })) : void r.navigateTo({
                                url: a.url
                            });
                            r.navigateTo({
                                url: a.url
                            });
                        } else r.navigateTo({
                            url: "../kefu/webview?return_url=" + encodeURIComponent(a.url)
                        });
                    },
                    fatherHeight: function(e) {
                        this.height = e;
                    },
                    showDialog1: function() {
                        this.$refs.showAlert_taobaoauth.open();
                    },
                    closeDialog1: function() {
                        this.$refs.showAlert_taobaoauth.hide();
                    },
                    showDialog2: function() {
                        this.$refs.showAlert_login.open();
                    },
                    closeDialog2: function() {
                        this.$refs.showAlert_login.hide();
                    },
                    showDialog3: function() {
                        this.$refs.showAlert.open();
                    },
                    closeDialog3: function() {
                        this.$refs.showAlert.hide();
                    },
                    load_elmwmqrcode: function() {
                        var a = this;
                        this.elmwmqrcode = "../../static/images/loadding-max.gif";
                        var o = this, e = c.globalData.util.url("entry/wxapp/qrcode2", {
                            m: c.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: "elmwm",
                                uid: r.getStorageSync("userinfo").user_id
                            },
                            success: function(e) {
                                var t = c.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), t = JSON.parse(t);
                                console.log(t), o.sharetitle = e.data.sharetitle, o.sharepic = e.data.sharepic, 
                                t.poster_url && t.data ? (o.elmwmqrcode = t.data, r.setStorageSync("elmwmqrcode", t.data), 
                                r.setStorageSync("elmwmposter", t.poster_url)) : o.elmwmqrcode = r.getStorageSync("setting").static_domain + "addons/" + a.module_name + "/static/images/elmwm.png";
                            }
                        });
                    },
                    load_elmscqrcode: function() {
                        this.elmscqrcode = "../../static/images/loadding-max.gif";
                        var a = this, e = c.globalData.util.url("entry/wxapp/qrcode2", {
                            m: c.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: "elmsc",
                                uid: r.getStorageSync("userinfo").user_id
                            },
                            success: function(e) {
                                var t = c.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), t = JSON.parse(t);
                                console.log(t), a.sharetitle = e.data.sharetitle, a.sharepic = e.data.sharepic, 
                                t.poster_url && t.data ? (a.elmscqrcode = t.data, r.setStorageSync("elmscqrcode", t.data), 
                                r.setStorageSync("elmscposter", t.poster_url)) : a.elmscqrcode = "../../static/images/elmcs.png";
                            }
                        });
                    },
                    load_elmwmqrcode2: function() {
                        this.elmwmqrcode = "../../static/images/loadding-max.gif";
                        var t = this;
                        this.appid_type = 3;
                        var e = c.globalData.util.url("entry/wxapp/gettaobaoauth", {
                            m: c.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: 3
                            },
                            success: function(e) {
                                1 == e.data.status ? (t.showDialog1(), t.qudao_tkl = e.data.data) : 0 == e.data.status ? r.showToast({
                                    title: "获取授权信息出错",
                                    icon: "none"
                                }) : 2 == e.data.status && (e = e.data.data, 3 == t.appid_type && (t.elmwmqrcode = e.elmwm_qrcode, 
                                r.setStorageSync("elmwmqrcode", e.elmwm_qrcode), r.setStorageSync("elmwm_url", e.elmwm_url), 
                                r.setStorageSync("elmwm_h5", e.elmwm_h5), r.setStorageSync("elmwm_qrcode2", e.elmwm_qrcode), 
                                r.setStorageSync("pid_time", +e.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", e.is_qudao)), 4 == t.appid_type && (r.setStorageSync("elmsc_url", e.elmsc_url), 
                                r.setStorageSync("elmsc_h5", e.elmsc_h5), r.setStorageSync("elmsc_qrcode2", e.elmsc_qrcode), 
                                r.setStorageSync("pid_time", +e.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", e.is_qudao), console.log(r.getStorageSync("elmsc_url"))), 
                                r.setNavigationBarColor({
                                    backgroundColor: t.setting.pagebgcolor,
                                    frontColor: "#FFFFFF"
                                }));
                            }
                        });
                    },
                    load_elmscqrcode2: function() {
                        var a, e;
                        r.getStorageSync("elmscqrcode") || (this.elmscqrcode = "../../static/images/loadding-max.gif", 
                        a = this, e = c.globalData.util.url("entry/wxapp/qrcode2", {
                            m: c.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: "elmsc",
                                uid: r.getStorageSync("userinfo").user_id
                            },
                            success: function(e) {
                                var t = c.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), t = JSON.parse(t);
                                a.elmscqrcode = t.data, a.sharetitle = e.data.sharetitle, a.sharepic = e.data.sharepic, 
                                r.setStorageSync("elmscqrcode", t.data), -1 != t.poster_url.indexOf("elmsc1") && r.getStorageSync("elmscposter") || r.setStorageSync("elmscposter", t.poster_url);
                            }
                        }));
                    },
                    userlogin: function() {
                        !r.getStorageSync("userinfo").nickname && 1 == r.getStorageSync("setting").login_type && wx.getUserProfile ? this.showDialog2() : this.closeDialog2();
                    },
                    login: function(t) {
                        var a = this;
                        this.closeDialog2(), r.getSetting({
                            success: function(e) {
                                e.authSetting["scope.userInfo"] ? r.getUserInfo({
                                    success: function(e) {
                                        a.userAuth(t, e.userInfo, "login");
                                    }
                                }) : a.userAuth(t, null, "login");
                            }
                        });
                    },
                    getWxCode: function() {
                        var t = this;
                        wx.login({
                            success: function(e) {
                                t.wxCode = e.code;
                            }
                        });
                    },
                    getUserProfile: function() {
                        var a = this;
                        wx.getUserProfile({
                            desc: "请完善会员资料",
                            success: function(e) {
                                console.log(e.userInfo);
                                var t = c.globalData.util.url("entry/wxapp/userinfo2", {
                                    m: c.globalData.module_name
                                }), e = {
                                    avatarUrl: e.userInfo.avatarUrl,
                                    nickName: e.userInfo.nickName,
                                    openid: r.getStorageSync("openid")
                                };
                                r.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: e,
                                    success: function(e) {
                                        1 == e.data.status && (r.setStorageSync("userinfo", e.data.data.userinfo), a.userinfo = e.data.data.userinfo, 
                                        a.closeDialog2(), r.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        }));
                                    }
                                });
                            }
                        });
                    },
                    userAuth: function(a, e, o) {
                        var n = this;
                        "getUserInfo:ok" == a.detail.errMsg ? wx.login({
                            success: function(e) {
                                var t = c.globalData.util.url("entry/wxapp/api", {
                                    m: c.globalData.module_name,
                                    o: "userinfo"
                                }), e = {
                                    code: e.code,
                                    encryptedData: a.detail.encryptedData,
                                    iv: a.detail.iv,
                                    openid: r.getStorageSync("openid"),
                                    invite_uid: wx.getStorageSync("invite_uid")
                                };
                                r.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: e,
                                    success: function(e) {
                                        1 == e.data.status ? (e = c.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), 
                                        e = JSON.parse(e), r.setStorageSync("userinfo", e.userinfo), n.userinfo = e.userinfo, 
                                        "login" == o && (n.closeDialog2(), r.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        })), 1 == n.currentIndex ? n.load_elmscqrcode2() : n.load_elmwmqrcode2()) : r.showToast({
                                            title: "您取消了请求",
                                            icon: "none"
                                        });
                                    }
                                });
                            }
                        }) : r.showToast({
                            title: "获取用户信息失败",
                            icon: "none"
                        });
                    },
                    closeAlert: function() {
                        this.closeDialog2();
                    },
                    updatepid: function() {
                        var e = c.globalData.util.url("entry/wxapp/api", {
                            m: c.globalData.module_name,
                            o: "updatepid"
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {}
                        });
                    },
                    lingnextwm: function() {
                        var e;
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (r.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), this.setting.waimaitt_elmwm_lingnextactid ? r.getStorageSync("waimaitt_elmwm_lingnexturl") ? (r.navigateToMiniProgram({
                            appId: r.getStorageSync("setting").waimaitt_elmwm_lingnextappid,
                            path: r.getStorageSync("waimaitt_elmwm_lingnexturl")
                        }), r.hideLoading()) : (e = c.globalData.util.url("entry/wxapp/lingelmnext_url", {
                            m: c.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                actid: this.setting.waimaitt_elmwm_lingnextactid
                            },
                            success: function(e) {
                                r.setStorageSync("waimaitt_elmwm_lingnexturl", e.data.data.elmwm_url), r.navigateToMiniProgram({
                                    appId: r.getStorageSync("setting").waimaitt_elmwm_lingnextappid,
                                    path: e.data.data.elmwm_url
                                }), r.hideLoading();
                            }
                        })) : (r.navigateToMiniProgram({
                            appId: r.getStorageSync("setting").waimaitt_elmwm_lingnextappid,
                            path: r.getStorageSync("setting").waimaitt_elmwm_lingnextpath
                        }), r.hideLoading())) : this.showDialog2();
                    },
                    lingnextsc: function() {
                        var e;
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (r.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), this.setting.waimaitt_elmsc_lingnextactid ? r.getStorageSync("waimaitt_elmsc_lingnexturl") ? (r.navigateToMiniProgram({
                            appId: r.getStorageSync("setting").waimaitt_elmsc_lingnextappid,
                            path: r.getStorageSync("waimaitt_elmsc_lingnexturl")
                        }), r.hideLoading()) : (e = c.globalData.util.url("entry/wxapp/lingelmnext_url", {
                            m: c.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                actid: this.setting.waimaitt_elmsc_lingnextactid
                            },
                            success: function(e) {
                                r.setStorageSync("waimaitt_elmsc_lingnexturl", e.data.data.elmwm_url), r.navigateToMiniProgram({
                                    appId: r.getStorageSync("setting").waimaitt_elmsc_lingnextappid,
                                    path: e.data.data.elmwm_url
                                }), r.hideLoading();
                            }
                        })) : (r.navigateToMiniProgram({
                            appId: r.getStorageSync("setting").waimaitt_elmsc_lingnextappid,
                            path: r.getStorageSync("setting").waimaitt_elmsc_lingnextpath
                        }), r.hideLoading())) : this.showDialog2();
                    },
                    gethongbao_elmwm: function() {
                        if (r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile) {
                            var a = this;
                            if (0 < r.getStorageSync("setting").warn_tplid.length && parseInt(r.getStorageSync("warn_daynum")) < parseInt(r.getStorageSync("setting").warn_tpl_daynum)) wx.requestSubscribeMessage({
                                tmplIds: r.getStorageSync("setting").warn_tplid,
                                success: function(e) {
                                    if ("reject" == e[r.getStorageSync("setting").warn_yhq_tplid]) {
                                        if (r.showLoading({
                                            title: "加载中...",
                                            mask: !1
                                        }), 0 == a.currentIndex && r.getStorageSync("elmwm_url")) r.navigateToMiniProgram({
                                            appId: "wxece3a9a4c82f58c9",
                                            path: r.getStorageSync("elmwm_url")
                                        }), r.hideLoading(), a.updatepid(), console.log(r.getStorageSync("elmwm_url")); else if (0 == a.currentIndex && !r.getStorageSync("elmwm_url")) return a.appid_type = 3, 
                                        void a.gettaobaoauth();
                                        if (1 == a.currentIndex && r.getStorageSync("elmsc_url")) r.navigateToMiniProgram({
                                            appId: "wxece3a9a4c82f58c9",
                                            path: r.getStorageSync("elmsc_url")
                                        }), r.hideLoading(), a.updatepid(), console.log(r.getStorageSync("elmsc_url")); else if (1 == a.currentIndex && !r.getStorageSync("elmsc_url")) return a.appid_type = 4, 
                                        void a.gettaobaoauth();
                                        var t = c.globalData.util.url("entry/wxapp/subscribemessage", {
                                            m: c.globalData.module_name
                                        });
                                        r.request({
                                            url: t,
                                            method: "POST",
                                            header: {
                                                "content-type": "application/x-www-form-urlencoded"
                                            },
                                            data: {
                                                openid: r.getStorageSync("openid"),
                                                type: 1
                                            },
                                            success: function(e) {
                                                r.setStorageSync("warn_daynum", e.data.warm_daynum);
                                            }
                                        });
                                    } else {
                                        if (r.showLoading({
                                            title: "加载中...",
                                            mask: !1
                                        }), t = c.globalData.util.url("entry/wxapp/subscribemessage", {
                                            m: c.globalData.module_name
                                        }), r.request({
                                            url: t,
                                            method: "POST",
                                            header: {
                                                "content-type": "application/x-www-form-urlencoded"
                                            },
                                            data: {
                                                openid: r.getStorageSync("openid"),
                                                type: 1
                                            },
                                            success: function(e) {
                                                r.setStorageSync("warn_daynum", e.data.warm_daynum);
                                            }
                                        }), 0 == a.currentIndex && r.getStorageSync("elmwm_url")) r.navigateToMiniProgram({
                                            appId: "wxece3a9a4c82f58c9",
                                            path: r.getStorageSync("elmwm_url")
                                        }), r.hideLoading(), a.updatepid(), console.log(r.getStorageSync("elmwm_url")); else if (0 == a.currentIndex && !r.getStorageSync("elmwm_url")) return a.appid_type = 3, 
                                        void a.gettaobaoauth();
                                        if (1 == a.currentIndex && r.getStorageSync("elmsc_url")) r.navigateToMiniProgram({
                                            appId: "wxece3a9a4c82f58c9",
                                            path: r.getStorageSync("elmsc_url")
                                        }), r.hideLoading(), a.updatepid(), console.log(r.getStorageSync("elmsc_url")); else if (1 == a.currentIndex && !r.getStorageSync("elmsc_url")) return a.appid_type = 4, 
                                        void a.gettaobaoauth();
                                    }
                                },
                                fail: function() {
                                    if (r.showLoading({
                                        title: "加载中...",
                                        mask: !1
                                    }), 0 == a.currentIndex && r.getStorageSync("elmwm_url")) r.navigateToMiniProgram({
                                        appId: "wxece3a9a4c82f58c9",
                                        path: r.getStorageSync("elmwm_url")
                                    }), r.hideLoading(), a.updatepid(), console.log(r.getStorageSync("elmwm_url")); else if (0 == a.currentIndex && !r.getStorageSync("elmwm_url")) return a.appid_type = 3, 
                                    void a.gettaobaoauth();
                                    if (1 == a.currentIndex && r.getStorageSync("elmsc_url")) r.navigateToMiniProgram({
                                        appId: "wxece3a9a4c82f58c9",
                                        path: r.getStorageSync("elmsc_url")
                                    }), r.hideLoading(), a.updatepid(), console.log(r.getStorageSync("elmsc_url")); else if (1 == a.currentIndex && !r.getStorageSync("elmsc_url")) return a.appid_type = 4, 
                                    void a.gettaobaoauth();
                                }
                            }); else {
                                r.showLoading({
                                    title: "加载中...",
                                    mask: !1
                                });
                                var e = c.globalData.util.url("entry/wxapp/subscribemessage", {
                                    m: c.globalData.module_name
                                });
                                if (r.request({
                                    url: e,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid"),
                                        type: 2
                                    },
                                    success: function(e) {
                                        r.setStorageSync("warn_daynum", e.data.warm_daynum);
                                    }
                                }), 0 == a.currentIndex && r.getStorageSync("elmwm_url")) r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: r.getStorageSync("elmwm_url")
                                }), r.hideLoading(), a.updatepid(), console.log(r.getStorageSync("elmwm_url")); else if (0 == a.currentIndex && !r.getStorageSync("elmwm_url")) return a.appid_type = 3, 
                                void a.gettaobaoauth();
                                if (1 == a.currentIndex && r.getStorageSync("elmsc_url")) r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: r.getStorageSync("elmsc_url")
                                }), r.hideLoading(), a.updatepid(), console.log(r.getStorageSync("elmsc_url")); else if (1 == a.currentIndex && !r.getStorageSync("elmsc_url")) return a.appid_type = 4, 
                                void a.gettaobaoauth();
                            }
                        } else this.showDialog2();
                    },
                    taobaoauth: function() {
                        var t = this;
                        r.setClipboardData({
                            data: this.qudao_tkl,
                            success: function(e) {
                                r.showToast({
                                    title: "复制成功，请打开淘宝APP授权",
                                    icon: "none"
                                }), t.is_qudao_tkl = 1;
                            }
                        });
                    },
                    tapButton: function() {
                        1 == this.currentIndex ? this.h5 = r.getStorageSync("elmsc_h5") : this.h5 = r.getStorageSync("elmwm_h5"), 
                        r.setClipboardData({
                            data: this.h5,
                            success: function(e) {
                                r.showToast({
                                    title: "复制成功",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    copy_wm: function() {
                        var e = r.getStorageSync("elmwm_h5");
                        r.setClipboardData({
                            data: e,
                            success: function(e) {
                                r.showToast({
                                    title: "复制成功",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    copy_sc: function() {
                        if (1 == r.getStorageSync("setting").poster_type) {
                            if (!r.getStorageSync("elmsc_h5")) return void r.showToast({
                                title: "请先生成海报",
                                icon: "none"
                            });
                            var e = r.getStorageSync("elmsc_h5");
                        } else e = r.getStorageSync("setting").waimaitt_elmsc_tuantext_c;
                        r.setClipboardData({
                            data: e,
                            success: function(e) {
                                r.showToast({
                                    title: "复制成功",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    retaobaoauth: function() {
                        this.is_qudao_tkl = 0, this.qudao_tkl = "", this.gettaobaoauth();
                    },
                    notaobaoauth: function() {
                        3 == this.appid_type && r.navigateToMiniProgram({
                            appId: "wxece3a9a4c82f58c9",
                            path: r.getStorageSync("setting").default_elmwmpath
                        }), 4 == this.appid_type && r.navigateToMiniProgram({
                            appId: "wxece3a9a4c82f58c9",
                            path: r.getStorageSync("setting").default_elmscpath
                        });
                    },
                    taobaoauth_done: function() {
                        var a = this;
                        0 == a.currentIndex ? a.appid_type = 3 : a.appid_type = 4;
                        var e = c.globalData.util.url("entry/wxapp/api", {
                            m: c.globalData.module_name,
                            o: "taobaoauth_done"
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: a.appid_type
                            },
                            success: function(e) {
                                var t;
                                0 != e.data.status ? (t = c.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), 
                                t = JSON.parse(t), 1 == e.data.status ? (3 == a.appid_type && (r.setStorageSync("elmwm_url", t.elmwm_url), 
                                a.elmwmqrcode = t.elmwm_qrcode, a.closeDialog1(), r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: t.elmwm_url
                                }), console.log(r.getStorageSync("elmwm_url"))), 4 == a.appid_type && (r.setStorageSync("elmsc_url", t.elmsc_url), 
                                a.elmscqrcode = t.elmsc_qrcode, a.closeDialog1(), r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: t.elmsc_url
                                }), console.log(r.getStorageSync("elmsc_url")))) : r.showModal({
                                    title: "提示",
                                    content: "未获取到您的授权信息，请重试！",
                                    showCancel: !1,
                                    success: function(e) {
                                        e.confirm || e.cancel;
                                    }
                                })) : r.showModal({
                                    title: "提示",
                                    content: "未获取到您的授权信息，请重试！",
                                    showCancel: !1,
                                    success: function(e) {
                                        e.confirm || e.cancel;
                                    }
                                });
                            }
                        }), r.hideLoading();
                    },
                    gettaobaoauth: function() {
                        var t = this, a = this;
                        if (0 == a.currentIndex && r.getStorageSync("elmwm_url")) return r.navigateToMiniProgram({
                            appId: "wxece3a9a4c82f58c9",
                            path: r.getStorageSync("elmwm_url")
                        }), r.hideLoading(), void console.log(r.getStorageSync("elmwm_url"));
                        if (1 == a.currentIndex && r.getStorageSync("elmsc_url")) return r.navigateToMiniProgram({
                            appId: "wxece3a9a4c82f58c9",
                            path: r.getStorageSync("elmsc_url")
                        }), r.hideLoading(), void console.log(r.getStorageSync("elmsc_url"));
                        0 == a.currentIndex ? a.appid_type = 3 : a.appid_type = 4;
                        var e = c.globalData.util.url("entry/wxapp/gettaobaoauth", {
                            m: c.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: a.appid_type
                            },
                            success: function(e) {
                                1 == e.data.status ? (a.showDialog1(), a.qudao_tkl = e.data.data) : 0 == e.data.status ? r.showToast({
                                    title: "获取授权信息出错",
                                    icon: "none"
                                }) : 2 == e.data.status && (e = e.data.data, 3 == t.appid_type && (r.setStorageSync("elmwm_url", e.elmwm_url), 
                                r.setStorageSync("elmwm_h5", e.elmwm_h5), r.setStorageSync("elmwm_qrcode2", e.elmwm_qrcode), 
                                r.setStorageSync("pid_time", +e.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", e.is_qudao), r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: e.elmwm_url
                                }), r.hideLoading(), console.log(r.getStorageSync("elmwm_url"))), 4 == t.appid_type && (r.setStorageSync("elmsc_url", e.elmsc_url), 
                                r.setStorageSync("elmsc_h5", e.elmsc_h5), r.setStorageSync("elmsc_qrcode2", e.elmsc_qrcode), 
                                r.setStorageSync("pid_time", +e.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", e.is_qudao), r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: e.elmsc_url
                                }), r.hideLoading(), console.log(r.getStorageSync("elmsc_url")))), r.hideLoading();
                            }
                        });
                    },
                    gettaobaoauth1: function(e) {
                        var t = this, a = this;
                        0 == a.currentIndex ? a.appid_type = 3 : a.appid_type = 4;
                        var o = c.globalData.util.url("entry/wxapp/api", {
                            m: c.globalData.module_name,
                            o: "qrcode_mtelm"
                        });
                        r.request({
                            url: o,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: a.appid_type
                            },
                            success: function(e) {
                                1 == e.data.status ? (a.showDialog1(), a.qudao_tkl = e.data.data) : 0 == e.data.status ? r.showToast({
                                    title: "获取授权信息出错",
                                    icon: "none"
                                }) : 2 == e.data.status && (e = c.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), 
                                e = JSON.parse(e), 3 == t.appid_type && (r.setStorageSync("elmwm_url", e.elmwm_url), 
                                r.setStorageSync("elmwm_h5", e.elmwm_h5), r.setStorageSync("elmwm_qrcode2", e.elmwm_qrcode), 
                                r.setStorageSync("pid_time", +e.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", e.is_qudao)), 4 == t.appid_type && (r.setStorageSync("elmsc_url", e.elmsc_url), 
                                r.setStorageSync("elmsc_h5", e.elmsc_h5), r.setStorageSync("elmsc_qrcode2", e.elmsc_qrcode), 
                                r.setStorageSync("pid_time", +e.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", e.is_qudao)));
                            }
                        });
                    },
                    close_poster: function() {
                        this.show_poster = !1;
                    },
                    previewImage: function(e) {
                        r.previewImage({
                            urls: [ e.currentTarget.dataset.src ],
                            current: 0
                        });
                    },
                    navChange: function(e) {
                        r.setStorageSync("index_nav", ""), this.loadposter = 0, this.currentIndex = e, 1 == this.currentIndex ? (this.pagebgcolor = r.getStorageSync("setting").waimaitt_elmsc_bgcolor, 
                        this.bgImg = r.getStorageSync("setting").waimaitt_elmsc_poster ? r.getStorageSync("setting").waimaitt_elmsc_poster : r.getStorageSync("setting").static_domain + "addons/" + this.module_name + "/static/images/poster/elmsc.png", 
                        this.qrcode = r.getStorageSync("elmscqrcode"), this.load_elmscqrcode2()) : (this.pagebgcolor = r.getStorageSync("setting").waimaitt_elmwm_bgcolor, 
                        this.bgImg = r.getStorageSync("setting").waimaitt_elmwm_poster ? r.getStorageSync("setting").waimaitt_elmwm_poster : r.getStorageSync("setting").static_domain + "addons/" + this.module_name + "/static/images/poster/elmwm.png", 
                        this.qrcode = r.getStorageSync("elmwmqrcode"), this.load_elmwmqrcode2());
                    },
                    swiperChange: function(e) {
                        r.setStorageSync("index_nav", ""), this.loadposter = 0;
                        e = e.detail.current;
                        this.currentIndex = e, 1 == this.currentIndex ? (this.pagebgcolor = r.getStorageSync("setting").waimaitt_elmsc_bgcolor, 
                        this.bgImg = r.getStorageSync("setting").waimaitt_elmsc_poster ? r.getStorageSync("setting").waimaitt_elmsc_poster : r.getStorageSync("setting").static_domain + "addons/" + this.module_name + "/static/images/poster/elmsc.png", 
                        this.qrcode = r.getStorageSync("elmscqrcode"), this.elmscposter ? this.imgSrc = this.elmscposter : this.imgSrc = "", 
                        this.load_elmscqrcode2()) : (this.pagebgcolor = r.getStorageSync("setting").waimaitt_elmwm_bgcolor, 
                        this.bgImg = r.getStorageSync("setting").waimaitt_elmwm_poster ? r.getStorageSync("setting").waimaitt_elmwm_poster : r.getStorageSync("setting").static_domain + "addons/" + this.module_name + "/static/images/poster/elmwm.png", 
                        this.qrcode = r.getStorageSync("elmwmqrcode"), this.elmwmposter ? this.imgSrc = this.elmwmposter : this.imgSrc = "", 
                        this.load_elmwmqrcode2());
                    },
                    goback: function() {
                        r.navigateBack({});
                    },
                    gohome: function() {
                        r.switchTab({
                            url: "../index/index"
                        });
                    },
                    getposter_elmwm1: function() {
                        if (r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile) return this.setting.waimaitt_elmwm_share_path ? void r.navigateTo({
                            url: this.setting.waimaitt_elmwm_share_path
                        }) : void r.navigateTo({
                            url: "../../pagesA/pages/shareA/index"
                        });
                        this.showDialog2();
                    },
                    getposter_elmwm: function() {
                        var t = this;
                        1 == this.currentIndex ? (t.qrcode = t.elmscqrcode, r.getStorageSync("elmscposter") ? -1 != r.getStorageSync("elmscposter").indexOf("mp.weixin") || r.getImageInfo({
                            src: r.getStorageSync("elmscposter"),
                            success: function(e) {
                                t.imgSrc = r.getStorageSync("elmscposter");
                            },
                            fail: function(e) {
                                t.context = r.createCanvasContext("graceCanvas"), t.initSize(), setTimeout(function() {
                                    t.draw();
                                }, 1e3);
                            }
                        }) : (t.context = r.createCanvasContext("graceCanvas"), t.initSize(), setTimeout(function() {
                            t.draw();
                        }, 1e3))) : (t.qrcode = t.elmwmqrcode, r.getStorageSync("elmwmposter") ? -1 != r.getStorageSync("elmwmposter").indexOf("mp.weixin") || r.getImageInfo({
                            src: r.getStorageSync("elmwmposter"),
                            success: function(e) {
                                t.imgSrc = r.getStorageSync("elmwmposter");
                            },
                            fail: function(e) {
                                t.context = r.createCanvasContext("graceCanvas"), t.initSize(), setTimeout(function() {
                                    t.draw();
                                }, 1e3);
                            }
                        }) : (t.context = r.createCanvasContext("graceCanvas"), t.initSize(), setTimeout(function() {
                            t.draw();
                        }, 1e3)));
                    },
                    initSize: function() {
                        this.widthIn = r.upx2px(this.width) * this.multiple, this.heightIn = r.upx2px(this.cheight) * this.multiple;
                    },
                    draw: function() {
                        var e = this;
                        this.step01(), "" != this.bgImg ? this.drawBGIMG(this.bgImg, function() {
                            e.step03();
                        }) : this.step03();
                    },
                    step01: function() {},
                    step03: function() {
                        var n = this;
                        1 == this.currentIndex ? 1 == r.getStorageSync("setting").poster_type ? this.qrcode = r.getStorageSync("elmsc_qrcode2") : this.qrcode = this.elmscqrcode : 1 == r.getStorageSync("setting").poster_type ? this.qrcode = r.getStorageSync("elmwm_qrcode2") : this.qrcode = this.elmwmqrcode, 
                        r.downloadFile({
                            url: this.qrcode,
                            success: function(e) {
                                var t, a, o;
                                200 === e.statusCode && (console.log("ok"), t = 0 == n.currentIndex ? (a = r.getStorageSync("setting").waimaitt_elmwm_poster_qrcode ? r.getStorageSync("setting").waimaitt_elmwm_poster_qrcode : 350, 
                                o = r.getStorageSync("setting").waimaitt_elmwm_poster_qrcodex ? r.getStorageSync("setting").waimaitt_elmwm_poster_qrcodex : 0, 
                                r.getStorageSync("setting").waimaitt_elmwm_poster_qrcodey ? r.getStorageSync("setting").waimaitt_elmwm_poster_qrcodey : 615) : (a = r.getStorageSync("setting").waimaitt_elmsc_poster_qrcode ? r.getStorageSync("setting").waimaitt_elmsc_poster_qrcode : 350, 
                                o = r.getStorageSync("setting").waimaitt_elmsc_poster_qrcodex ? r.getStorageSync("setting").waimaitt_elmsc_poster_qrcodex : 0, 
                                r.getStorageSync("setting").waimaitt_elmsc_poster_qrcodey ? r.getStorageSync("setting").waimaitt_elmsc_poster_qrcodey : 615), 
                                a = r.upx2px(a) * n.multiple, o = r.upx2px(o) * n.multiple, o = (n.widthIn - a + o) / 2, 
                                n.context.drawImage(e.tempFilePath, o, n.heightIn - r.upx2px(t) * n.multiple, a, a), 
                                n.drawIt());
                            },
                            fail: function(e) {
                                console.log(e);
                            }
                        });
                    },
                    drawText: function(e, t, a, o, n, i) {},
                    drawIt: function() {
                        var t = this;
                        this.imgSrc = "", this.context.draw(!0, function() {
                            r.canvasToTempFilePath({
                                x: 0,
                                y: 0,
                                width: t.widthIn,
                                height: t.heightIn,
                                destWidth: t.widthIn,
                                destHeight: t.heightIn,
                                canvasId: "graceCanvas",
                                success: function(e) {
                                    console.log(e), 1 == t.loadposter && (t.show_poster = !0, t.loadposter = 0), 1 == t.currentIndex ? (t.elmscposter = e.tempFilePath, 
                                    t.imgSrc = e.tempFilePath, t.h5 = r.getStorageSync("elmsc_h5"), r.setStorageSync("elmscposter", e.tempFilePath)) : (t.elmwmposter = e.tempFilePath, 
                                    t.imgSrc = e.tempFilePath, r.setStorageSync("elmwmposter", e.tempFilePath), t.h5 = r.getStorageSync("elmwm_h5")), 
                                    setTimeout(function() {
                                        r.hideLoading();
                                    }, 1e3);
                                },
                                fail: function(e) {
                                    console.log(e), r.hideLoading();
                                }
                            });
                        });
                    },
                    drawBGIMG: function(e, a) {
                        var o = this;
                        r.downloadFile({
                            url: e,
                            success: function(t) {
                                200 == t.statusCode && r.getImageInfo({
                                    src: t.tempFilePath,
                                    success: function(e) {
                                        e = o.widthIn / e.width * e.height;
                                        console.log(e), o.context.drawImage(t.tempFilePath, 0, 0, o.widthIn, e), a();
                                    }
                                });
                            }
                        });
                    },
                    openShopad: function(e) {
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (e = e.currentTarget.dataset, 
                        this.api_url = e.item_id, this.openad(e)) : this.showDialog2();
                    },
                    openad: function(a) {
                        var e, o = this;
                        1 == a.is_warm && a.tplid ? (e = c.globalData.util.url("entry/wxapp/subscribemessage2", {
                            m: c.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                id: a.item_id,
                                type: 2
                            },
                            success: function(e) {
                                var t;
                                r.setStorageSync("subscribemessage" + a.item_id, e.data.warm_daynum), parseInt(r.getStorageSync("subscribemessage" + a.item_id)) < parseInt(a.tplid_oneday_num) ? (t = new Array(), 
                                t = a.tplid.split(","), wx.requestSubscribeMessage({
                                    tmplIds: t,
                                    success: function(e) {
                                        "reject" == e[t[0]] ? 7 != a.adtype ? o.openad2(a) : r.showToast({
                                            title: "您取消了订阅",
                                            icon: "none"
                                        }) : (e = c.globalData.util.url("entry/wxapp/subscribemessage2", {
                                            m: c.globalData.module_name
                                        }), r.request({
                                            url: e,
                                            method: "POST",
                                            header: {
                                                "content-type": "application/x-www-form-urlencoded"
                                            },
                                            data: {
                                                openid: r.getStorageSync("openid"),
                                                id: a.item_id,
                                                type: 1
                                            },
                                            success: function(e) {
                                                r.setStorageSync("subscribemessage" + a.item_id, e.data.warm_daynum), 7 != a.adtype || r.showToast({
                                                    title: "订阅成功",
                                                    icon: "none"
                                                });
                                            }
                                        }), o.openad2(a));
                                    },
                                    fail: function(e) {
                                        7 != a.adtype ? e.openad2(a) : r.showToast({
                                            title: "您已订阅",
                                            icon: "none"
                                        });
                                    }
                                })) : o.openad2(a);
                            }
                        })) : o.openad2(a);
                    },
                    openad2: function(t) {
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var e, a, o = this;
                        1 == t.adtype || 14 == t.adtype || 15 == t.adtype ? 0 < t.appid_type2 || 14 == t.adtype || 15 == t.adtype ? (e = c.globalData.util.url("entry/wxapp/index_jump", {
                            m: c.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                adid: t.item_id
                            },
                            success: function(e) {
                                1 == e.data.jump_type ? r.navigateToMiniProgram({
                                    appId: e.data.jump_appid,
                                    path: e.data.jump_path
                                }) : 2 == e.data.jump_type ? (o.contact_type = "ad_new", o.contact_id = t.item_id, 
                                o.contact_title = e.data.title, o.contact_title_text = e.data.title_text, o.contact_title_desc = e.data.title_desc, 
                                o.contact_thumb = r.getStorageSync("setting").dianwo, o.showDialog3()) : r.showToast({
                                    title: e.data.msg,
                                    icon: "none"
                                }), r.hideLoading();
                            }
                        })) : (r.navigateToMiniProgram({
                            appId: t.appid,
                            path: t.path
                        }), r.hideLoading()) : 5 == t.adtype ? (r.navigateTo({
                            url: "../kefu/webview?return_url=" + encodeURIComponent(t.url) + "&t=" + Date.parse(new Date())
                        }), r.hideLoading()) : 10 == t.adtype ? (this.$refs.addmini.showAddMiniProgramTips = 1, 
                        r.hideLoading()) : 11 == t.adtype || 7 == t.adtype ? r.hideLoading() : 4 == t.adtype ? (r.setStorageSync("index_nav", t.url), 
                        -1 != t.url.indexOf("../index/") || -1 != t.url.indexOf("../meituangroup/") || -1 != t.url.indexOf("../user/") || -1 != t.url.indexOf("../movie/") || -1 != t.url.indexOf("../shop/") || -1 != t.url.indexOf("../kefu/") || -1 != t.url.indexOf("../meituan/") || -1 != t.url.indexOf("../elm/") || -1 != t.url.indexOf("../mall/") ? r.navigateTo({
                            url: t.url
                        }) : -1 != t.url.indexOf("../../../pages/index/") || -1 != t.url.indexOf("../../../pages/user/") || -1 != t.url.indexOf("../../../pages/kefu/") ? (a = t.url.replace("../../../pages/", "../"), 
                        r.navigateTo({
                            url: a
                        })) : -1 != t.url.indexOf("../../../pages/meituan/") || -1 != t.url.indexOf("../../../pages/elm/") || -1 != t.url.indexOf("../../../pages/eat/") ? (a = t.url.replace("../../../pages/", "../../pagesA/pages/"), 
                        r.navigateTo({
                            url: a
                        })) : -1 != t.url.indexOf("../../pagesA/pages/movie/") || -1 != t.url.indexOf("../../pagesA/pages/shop/") || -1 != t.url.indexOf("../../pagesA/pages/mallA/mallindex") ? (a = t.url.replace("../../pagesA/pages/", "../"), 
                        r.navigateTo({
                            url: a
                        })) : -1 == t.url.indexOf("../../pagesA/pages/movieA/") && -1 == t.url.indexOf("../../pagesA/pages/shopA/") && -1 == t.url.indexOf("../../pagesA/pages/meituan/") && -1 == t.url.indexOf("../../pagesA/pages/elm/") && -1 == t.url.indexOf("../../pagesA/pages/eat/") && -1 == t.url.indexOf("../../pagesA/pages/userA/") && (-1 != t.url.indexOf("../meituan/") || -1 != t.url.indexOf("../elm/") || -1 != t.url.indexOf("../eat/")) ? (a = t.url.replace("../", "../../pagesA/pages/"), 
                        r.navigateTo({
                            url: a
                        })) : r.navigateTo({
                            url: t.url
                        }), r.hideLoading(), r.hideLoading()) : 2 == t.adtype || 3 == t.adtype || 9 == t.adtype ? (e = c.globalData.util.url("entry/wxapp/api", {
                            m: c.globalData.module_name,
                            o: "ad_kefubind"
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                adtype: "ad_new",
                                adid: t.item_id,
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {}
                        }), this.contact_title_desc = "", this.contact_type = "ad_new", this.contact_id = t.item_id, 
                        this.contact_title = t.title, this.contact_title_text = t.title_text, this.contact_title_desc = t.title_desc, 
                        this.contact_thumb = r.getStorageSync("setting").dianwo, r.hideLoading(), this.showDialog3()) : 8 == t.adtype ? 1 == t.mall_adtype ? r.navigateTo({
                            url: "../../pagesA/pages/mallA/huodong?id=" + t.item_id
                        }) : 2 == t.mall_adtype && this.loadMallapigoodslist(t) : 12 == t.adtype ? (r.previewImage({
                            urls: [ t.open_thumb ]
                        }), r.hideLoading()) : 13 == t.adtype && this.getCoupon(t);
                    },
                    loadMallapigoodslist: function(t) {
                        this.loadStatus = "loading";
                        var e = c.globalData.util.url("entry/wxapp/mallapigoodslist", {
                            m: c.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                id: t.item_id,
                                lon: r.getStorageSync("lon"),
                                lat: r.getStorageSync("lat")
                            },
                            success: function(e) {
                                200 == e.data.code && (e.data.appid ? r.navigateToMiniProgram({
                                    appId: e.data.appid,
                                    path: e.data.path
                                }) : r.navigateTo({
                                    url: "../../pagesA/pages/mallA/huodong?id=" + t.item_id
                                })), r.hideLoading();
                            }
                        });
                    },
                    getCoupon: function(t) {
                        var a = this;
                        if (r.getStorageSync("path" + t.item_id)) return r.getStorageSync("appid" + t.item_id) ? r.navigateToMiniProgram({
                            appId: r.getStorageSync("appid" + t.item_id),
                            path: r.getStorageSync("path" + t.item_id)
                        }) : r.setClipboardData({
                            data: r.getStorageSync("path" + t.item_id),
                            success: function(e) {
                                r.showToast({
                                    title: "内容已复制",
                                    icon: "success"
                                });
                            }
                        }), void r.hideLoading();
                        var e = c.globalData.util.url("entry/wxapp/mall_goods_getcoupon", {
                            m: c.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                goodsid: t.goodsid,
                                pingtai: t.mall_type,
                                goodssign: t.goodssign,
                                search_id: a.search_id,
                                quan_url: t.quan_url,
                                uid: a.uid,
                                id: t.item_id
                            },
                            success: function(e) {
                                200 == e.data.code && ("tb" == t.mall_type ? (a.path = e.data.tkl, r.setStorageSync("path" + t.item_id, e.data.tkl), 
                                r.setStorageSync("pid_time", e.data.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setClipboardData({
                                    data: e.data.tkl,
                                    success: function(e) {
                                        r.showToast({
                                            title: "内容已复制",
                                            icon: "success"
                                        });
                                    }
                                })) : (a.appid = e.data.appid, a.path = e.data.path, r.setStorageSync("appid" + t.item_id, e.data.appid), 
                                r.setStorageSync("path" + t.item_id, e.data.path), r.navigateToMiniProgram({
                                    appId: e.data.appid,
                                    path: e.data.path
                                })), r.hideLoading());
                            }
                        });
                    }
                }
            };
            o.default = t;
        }).call(this, n("543d").default);
    },
    "3d19": function(e, t, a) {
        var o = a("a3e7");
        a.n(o).a;
    },
    "3f12": function(e, t, a) {
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            a("0cda"), t(a("66fd")), e(t(a("6fe8")).default);
        }).call(this, a("543d").createPage);
    },
    "5fb1": function(e, t, a) {
        a.d(t, "b", function() {
            return n;
        }), a.d(t, "c", function() {
            return i;
        }), a.d(t, "a", function() {
            return o;
        });
        var o = {
            sjTabBar: function() {
                return a.e("components/sj-tab-bar/sj-tab-bar").then(a.bind(null, "1ba9"));
            }
        }, n = function() {
            this.$createElement;
            this._self._c;
        }, i = [];
    },
    "6fe8": function(e, t, a) {
        a.r(t);
        var o, n = a("5fb1"), i = a("b3eb");
        for (o in i) "default" !== o && function(e) {
            a.d(t, e, function() {
                return i[e];
            });
        }(o);
        a("3d19");
        var r = a("f0c5"), n = Object(r.a)(i.default, n.b, n.c, !1, null, null, null, !1, n.a, void 0);
        t.default = n.exports;
    },
    a3e7: function(e, t, a) {},
    b3eb: function(e, t, a) {
        a.r(t);
        var o, n = a("3139"), i = a.n(n);
        for (o in n) "default" !== o && function(e) {
            a.d(t, e, function() {
                return n[e];
            });
        }(o);
        t.default = i.a;
    }
}, [ [ "3f12", "common/runtime", "common/vendor" ] ] ]);